package cn.itcast.nems.common.bean;


import java.util.Objects;

/**
 * 
 * 定时任务异常
 *
 * @author 刘曙
 *
 * @version 
 *
 * @since 2024年3月17日
 */
public class SchedulerBizException extends RuntimeException {

    private static final long serialVersionUID = 7071370060441487404L;

    public SchedulerBizException(Throwable e) {
        super(Objects.isNull(e) ? "定时任务执行过程中发生业务异常！" : e.getLocalizedMessage(), e);
    }

    public SchedulerBizException(String message) {
        super(message);
    }

    public SchedulerBizException(String messageTemplate, Object... params) {
        super(String.format(messageTemplate, params));
    }

    public SchedulerBizException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public SchedulerBizException(Throwable throwable, String messageTemplate, Object... params) {
        super(String.format(messageTemplate, params), throwable);
    }
}
